/*    */ package com.zimbra.cs.dav.service.method;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.dav.DavContext;
/*    */ import com.zimbra.cs.dav.DavException;
/*    */ import com.zimbra.cs.dav.LockMgr;
/*    */ import com.zimbra.cs.dav.LockMgr.Lock;
/*    */ import com.zimbra.cs.dav.service.DavMethod;
/*    */ import java.io.IOException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class Unlock
/*    */   extends DavMethod
/*    */ {
/*    */   public static final String UNLOCK = "UNLOCK";
/*    */   
/* 33 */   public String getName() { return "UNLOCK"; }
/*    */   
/*    */   public void handle(DavContext ctxt) throws DavException, IOException, ServiceException {
/* 36 */     String token = ctxt.getRequest().getHeader("Lock-Token");
/* 37 */     if (token != null) {
/* 38 */       LockMgr.getInstance().deleteLock(ctxt, ctxt.getUri(), LockMgr.Lock.parseLockTokenHeader(token));
/*    */     }
/* 40 */     ctxt.getResponse().setStatus(204);
/* 41 */     ctxt.responseSent();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/dav/service/method/Unlock.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */